package com.itheima.demo002;

public class homework001 {
    public static void main(String[] args) {
        /*
        (第一次作业)
        int money = 500;
        int in = money + 250 - 100;
        System.out.println(in);//650
        */

        //八种基本数据类型(第二次作业)
        /*整数，int short long byte(-128~127)*/
        /*
        int a = 100;
        System.out.println(a);
        short b = 6;
        System.out.println(b);
        long c = 20040519;
        System.out.println(c);
        byte d = 120;
        System.out.println(d);
        //浮点数，double float
        double m = 3.1415926;
        System.out.println(m);
        float n = 0;
        System.out.println(n);
        //字符，0~65535
        char i = '6';
        System.out.println(i);
        //布尔，true & false
        */

        /*
        (第三次作业)
        int classmate = 100;
        double peice = 55.55;
        long year = 46;
        boolean v = false;
        System.out.println(classmate);
        System.out.println(peice);
        System.out.println(year);
        System.out.println(v);
        */

        /*
        (第四次作业简洁版)
        double boy = (177 + 165) * 1.08 / 2;
        double girl = (177 * 0.923 + 165) / 2;
        System.out.println(boy);//184.68
        System.out.println(girl);//164.1855
        */

        /*
        (第四次作业完整版)
        double father = 177;
        double mother = 165;
        double son = (father + mother) * 1.08 / 2;
        double daughter = (father * 0.923 + mother) / 2;
        System.out.println("儿子预计身高" + son + "厘米");
        System.out.println("女儿预计身高" + daughter + "厘米");
        */

        /*
        (第五次作业)
        int red = 21 * 2 + 3;
        int green = 24 * 2;
        System.out.println(red);
        System.out.println(green);
        if(red > green){
            System.out.println("红茶妹妹更有钱");
        }
        else if(red < green){
            System.out.println("绿茶妹妹更有钱");
        }
        else{
            System.out.println("红茶绿茶钱一样多");
        }
        */

        /*
        (第六次作业)
        Scanner sc = new Scanner(System.in);
        System.out.println("请输入一个三位数");
        int i = sc.nextInt();
        int sum = 0;
        int ge = i % 10;
        int shi = i / 10 % 10;
        int bai = i / 100 % 10;
        sum = ge + shi + bai;
        System.out.println(sum);
        */

        /*
        (第七次作业)
        double money1 = 24 + 8 + 3;//28.0
        money1 = (money1 >= 30 ? money1 * 0.8 : money1);
        double money2 = 16 + 8 + 3;//27.0
        double money = money1 < money2 ? money1 : money2;
        System.out.println(money);//方案二便宜
        */
    }
}
